package com.kfit.java8.stream;

import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;
import java.util.stream.Stream;

public class Test4 {
	public static void main(String[] args) {
		List<String> strings = Arrays.asList("悟空","","唐僧","八戒","悟净","白龙马");
		Stream<String> stream = strings.stream();
		
		Stream<String> parallelStream = strings.parallelStream();
		
		List<String> fileded = strings.stream().filter(string -> !string.isEmpty()).collect(Collectors.toList());
		for(String s:fileded) {
			System.out.println(s);
		}
		
		
	}
	
	
}
